﻿using GameFramework.WebServer;

namespace Server.Proto
{
    /// <summary>
    /// SDK鉴权请求
    /// </summary>
    public class WebAuthReq : WebServerReq<WebAuthResp>
    {
        public const string RouteKey = "auth";

        public override string Route => RouteKey;
        
        /// <summary>
        /// SDK类型
        /// </summary>
        public LoginSDKType SDKType { get; set; }
        
        /// <summary>
        /// SDK唯一id
        /// </summary>
        public string SDKUid { get; set; }
        
        /// <summary>
        /// SDK鉴权票据
        /// </summary>
        public string SDKToken { get; set; }
        
        /// <summary>
        /// 设备id
        /// </summary>
        public string DeviceId { get; set; }
        
        /// <summary>
        /// 额外信息
        /// </summary>
        public string Extra { get; set; }

        public override void OnRecycle()
        {
            SDKType = default;
            SDKUid = string.Empty;
            SDKToken = string.Empty;
            DeviceId = string.Empty;
            Extra = string.Empty;
        }
    }
}